<?php
$section = "press";
$titre = _LB_EVENT;
$link = $section;
Session::setBackLink($link);
//create cfer

$id = Request::getNumber("id");
$press = new Press();
if($id > 0 && !$press->get($id)){
    redirect(APPLICATION_URL_FO."/press/");
}
if($press->ID){
    $titre .= TITLE_PAGE_SEPARATE . $press->TITLE;
}
if($id==0){
    $press->DISABLED = 0;
    $press->orderBy("ID DESC");
    $press->find();
}
$cfer = new Cfer(array(
	_LB_HOME =>  APPLICATION_URL_FO,
    _LB_PRESS => APPLICATION_URL_FO."/press/"
));
Session::setBackCfer($link, $cfer->getCferArray());
$smarty->assign('cfer', $cfer);
$smarty->assign('id', $id);
$smarty->assign('press', $press);
$smarty->assign('titre', $titre);
$smarty->display("press.html");
?>
